| Total Complexity | 1 |
| Total Lines | 10 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { Inject } from '@nestjs/common'; |
||
| 6 | |||
| 7 | @QueryHandler(GetUserByEmailQuery) |
||
| 8 | export class GetUserByEmailQueryHandler { |
||
| 9 | constructor( |
||
| 10 | @Inject('IUserRepository') |
||
| 11 | private readonly userRepository: IUserRepository |
||
| 12 | ) {} |
||
| 13 | |||
| 14 | public async execute(query: GetUserByEmailQuery): Promise<User | undefined> { |
||
| 15 | return await this.userRepository.findOneByEmail(query.email); |
||
| 16 | } |
||
| 18 |